<template>
    <el-dialog
        title="查看信审批复建议"
        :visible.sync="dialogVisible"
        width="50%">
        <div>
            <el-table
                v-loading="loading"
                :data="basicList"
                :header-cell-style="{ background: '#FAFAFA', color: '#000000' }" border>
                <template slot="empty">
                    <el-empty :image-size="50" description="暂无批复建议信息"></el-empty>
                </template>
                <el-table-column
                    align="center"
                    prop="approvalStatus"
                    label="信审批复建议"
                    min-width="120">
                    <template v-slot="{row}">
                       {{row.approval|creditSuggestionApproval}}
                    </template>
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="auditTime"
                    label="提交时间"
                    min-width="120">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="auditPerson"
                    label="提交人"
                    min-width="120">
                </el-table-column>
                <el-table-column
                    align="center"
                    prop="approvalStatus"
                    label="状态"
                    min-width="120">
                    <template v-slot="{row}">
                      <template v-if="row.rejectionMark==1">批复建议被驳回</template>
                      <template v-else>{{ row.approvalStatus|creditSuggestionApprovalStatus }}</template>
                    </template>
                </el-table-column>
                <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200" fixed="right">
                    <template v-slot="{ row }">
                        <el-button size="small" type="text"
                                   @click="goDetail(row)">查看
                        </el-button>
                    </template>
                </el-table-column>
            </el-table>
        </div>
    </el-dialog>
</template>

<script>

import * as letterReviewApi from "@/api/letterReview/letterReview";
export default {
    components: {},
    props: {},
    data() {
        // 这里存放数据
        return {
            loading:false,
            dialogVisible:false,
            basicList:[]
        }
    },
    computed: {},
    // 方法集合
    methods: {
        getList(applicationNo){
            this.loading=true
            this.basicList=[]
            letterReviewApi.approvalSuggestions(applicationNo).then((res)=>{
                this.basicList = res.data
                this.loading=false
            })
        },
        goDetail(row){
            this._toPage({
                name:'ReplySuggestionDetail',
                query:{
                    id:row.id
                }
            })
            this.dialogVisible = false
        },
        show(applicationNo) {
            this.dialogVisible = true
            this.getList(applicationNo)
        },
        close(){
            this.dialogVisible=false
        }
    },
    mounted() {
    },

}
</script>

<style lang="scss" scoped>
</style>
